package com.example.server.mapper;


import com.example.server.domain.Dormchange;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;


public interface DormchangeMapper extends Mapper<Dormchange> {


    @Update("update dormchange set aprovestatus = '通过' where id = #{id}")
    void approvePass(Long id);

    @Update("update dormchange set aprovestatus = '拒绝' where id = #{id}")
    void approveReject(Long id);


    @Select("select * from dormchange where sname like concat('%',#{0},'%')")
    List<Dormchange> querylike(String sname);
}
